To use the Riemann Sums utility, choose the command "Riemann Sums" from the Utilities Menu. The menu bar will disappear, and the Riemann Sums utility will fill the screen.
A Riemann sum is an approximation for a definite integral of a function on an interval xmin <= x <= xmax. If the function is greater than or equal to zero over the interval, then the definite integral is just the area of the region under the curve. A Riemann sum approximates this region with rectangles whose area can be easily computed.
There are a number of different rules for deciding which rectangles to use, and this program supports six of them: the left endpoint rule, the right endpoint rule, the midpoint rule, circumscribed rectangles, inscribed rectangles, and the trapezoid rule. (The last of these actually uses trapezoids instead of rectangles to do the approximation and does not, strictly speaking, produce a Riemann sum.) You can choose to work with either one or two of these rules at a time, and you can change rules at any time you like. (To choose a single rule, double-click on its radio button.)
After you have specified the function and the maximum and minimum values for x and y, click on either the Graph button or the Table button. The Graph button will draw the graph and the approximating rectangles. A table will allow you to scroll through information about each of the subintervals that form the bases of the rectangle. In any case, the total area of the rectangles or trapezoids will be printed under the display area. This total represents an approximation for the definite integral. In the case where the function takes on negative values, signed area is used; that is, area under the x-axis is counted as being negative.
When you first display either a table or graph, only one subinterval will be used. A button is provided to divide this interval in half repeatedly. An upper limit of 512 intervals is imposed. Another button is provided to return to a single subinterval. When the display is a table, a third button appears at the bottom of the display area, which allows you to subdivide the single interval currently displayed on the table. When the display is a graph, you can subdivide an interval by moving the mouse over the graph and clicking at the position where you want the new subdivision point to be inserted--only the x-coordinate of the point where you click is significant, and this value will be displayed in the lower left corner of the display rectangle.
The program is set up to allow you to easily divide an interval into 2, 4, 8, 16, 32, ... subintervals. It is also possible to divide an interval into any number of equal-sized subintervals: Starting with a single interval, choose the table display. Click on the Subdivide Interval button. Type the number of subintervals that you want into the dialog box that is presented, and click on OK, or press return. The interval will be divided into the specified number of subintervals. Just click on the Graph button if you want to see the graph. The Subdivide Interval button can also be used to divide the interval at any points you choose, so that you can get subintervals that are not all the same size.
The data presented in the graph or table is really useful only for a fairly small number of intervals. Even the maximum number of intervals allowed is not sufficient to give a good approximation for the definite integral. The only reason for using this utility is to learn something about Riemann Sums.
Other caveats: (1) When using the circumscribed rectangle and inscribed rectangle rules, this program tries to find good approximations for the maximum and minimum values of the function on each subinterval. The methods used will probably not give the exact values, but the results should look ok on the graph, and the error introduced into the total area should be much less than the difference between that area and the exact value of the definite integral. (2) You should only apply this utility to functions that are continuous, or at least piecewise continuous, on the specified interval.